package com.example;

import com.google.common.hash.BloomFilter;
import com.google.common.hash.Funnels;

import java.util.ArrayList;
import java.util.List;

/**
 * Hello world!
 *
 */
public class App 
{
    private static BloomFilter<Integer> bloomFilter = BloomFilter.create(Funnels.integerFunnel(),1000000,0.1);
    public static void main( String[] args )
    {
        for (int i = 0; i < 1000000; i++) {
            bloomFilter.put(i);
        }
        List<Integer> list = new ArrayList<>(10000);
        for (int i = 0; i <10000 ; i++) {
            if(bloomFilter.mightContain(i)){
                list.add(i);
            }
        }
        System.out.println( "Hello World!" + list.size() );
    }
}
